<?php
/**
 * Administrator Index Controller
 *
 * @autor: Mamy RAKOTONIRINA
 * @emil: amy.r@rmh-solution.com
 */

namespace Administrator\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\EventManager\EventManagerInterface;
use Zend\View\Model\ViewModel;

class IndexController extends AbstractActionController {
    public function setEventManager(EventManagerInterface $events) {
        parent::setEventManager($events);
        
        $controller = $this;
        $events->attach('dispatch', function($e) use ($controller) {
            $controller->layout()->setTemplate('layout/administrator');
        }, 100);
        
        return $this;
    }
    
    public function indexAction() {
        return new ViewModel();
    }
}
